# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=hotspotter
pkgver=0.4
pkgrel=3
pkgdesc='Passively monitors the network for probe request frames to identify the preferred networks of Windows XP clients, and will compare it to a supplied list of common hotspot network names.'
url='http://www.remote-exploit.org/?page_id=418'
groups=('blackarch' 'blackarch-wireless')
license=('GPL')
arch=('x86_64' 'aarch64')
source=("http://www.wirelessdefence.org/Contents/Files/$pkgname-$pkgver.tar.gz")
sha512sums=('c573a75dff6386e1dbb98bc3121f0daf4e297afe')

build() {
  cd "$pkgname-$pkgver/src"

  sed -i "s|-g3 -ggdb|$CFLAGS|g" Makefile

  make
}

package(){
  cd "$pkgname-$pkgver/src"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 ../README "$pkgdir/usr/share/$pkgname/README"
  install -Dm 644 ../HOTSPOTLIST "$pkgdir/usr/share/$pkgname/HOTSPOTLIST"
}

